<template>
	<view class="navbar">
		<view class="navbar-fixed">
			<view :style="{height: statusBarHeight + 'px'}"></view>
			<view class="navbar-content" 
			:style="{color: Theader.appearance.fontColor,fontSize: 2*Theader.appearance.fontSize+'rpx',height: navbarHeight + 'px'}">
				<!-- <text class="iconfont icon-home"></text> -->
				{{Theader.content.text}}
			</view>
		</view>
		<view :style="{height: statusBarHeight + navbarHeight + 'px'}"></view>
	</view>
</template>

<script>
	export default {
		props: ['Theader'],
		data() {
			return {
				statusBarHeight: 20,
				navbarHeight: 45
			};
		},
		created() {
			console.log(this.Theader)
			const info = uni.getSystemInfoSync()
			this.statusBarHeight = info.statusBarHeight
			// #ifdef MP
			const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
			this.navbarHeight = (menuButtonInfo.bottom - info.statusBarHeight) + (menuButtonInfo.top - info.statusBarHeight)			
			// #endif
		},
		methods: {
			show(data) {
				
			}
		}
	}
</script>

<style lang="scss">
	@import '../../common/css/icons.css';
	.navbar {
		.navbar-fixed {
			position: fixed;
			top: 0;
			left: 0;
			z-index: 888; 
			width: 100%;
			background-color: $base-color;
			.navbar-content {
				display: flex;
				justify-content: center;
				align-items: center;
				height: 45px;
				font-size: 28rpx;
				box-sizing: border-box;
			}
		}
	}
</style>
